From faae434eb0baf1d1e6222897cd684d570ee22d7f Mon Sep 17 00:00:00 2001 From: "cl349@freefall.cl.cam.ac.uk" Date: Tue, 16 Nov 2004 18:57:48 +0000 Subject: [PATCH] bitkeeper revision 1.1159.1.427 (419a4dacYXoRnTKw9jlnxnjLIcPbAg) Disable writabel pagetables for CONFIG_SMP. --- .../include/asm-xen/asm-i386/pgtable-2level.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h index aa23bd9d55..c7a40f936a 100644 --- a/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h +++ b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h @@ -23,6 +23,16 @@ static inline int pgd_present(pgd_t pgd) { return 1; } * within a page table are directly modified. Thus, the following * hook is made available. */ +#ifdef CONFIG_SMP +#define set_pte(pteptr, pteval) xen_l1_entry_update(pteptr, (pteval).pte_low) +#if 0 +do { \ + (*(pteptr) = pteval); \ + HYPERVISOR_xen_version(0); \ +} while (0) +#endif +#define set_pte_atomic(pteptr, pteval) set_pte(pteptr, pteval) +#else #ifdef CONFIG_XEN_WRITABLE_PAGETABLES #define set_pte(pteptr, pteval) (*(pteptr) = pteval) #define set_pte_atomic(pteptr, pteval) (*(pteptr) = pteval) @@ -30,6 +40,7 @@ static inline int pgd_present(pgd_t pgd) { return 1; } #define set_pte(pteptr, pteval) xen_l1_entry_update(pteptr, (pteval).pte_low) #define set_pte_atomic(pteptr, pteval) xen_l1_entry_update(pteptr, (pteval).pte_low) #endif +#endif /* * (pmds are folded into pgds so this doesn't get actually called, * but the define is needed for a generic inline function.) -- 2.30.2